﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Blog.Model;
using Blog.BLL;

namespace App.Blog.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
        public ActionResult Editor()
        {
            ViewBag.Message = "Your Editor your Articls";
            return View();
        }
        public ActionResult Save()
        {
            Article re = new Article();
            re.Content= Request["content"].ToString();
            ArticleService articleService = new ArticleService();
            articleService.Save(re);
            return Content("ok");

        }
    }
}